package com.rjxy.plansystemmanagement.mapper;

import com.rjxy.plansystemmanagement.entity.AirlinerInformation;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface AirlinerMapper {

    @Select("select * from airlinerinformation")
    List<AirlinerInformation> list();
    @Delete("delete from airlinerinformation where id = #{id}")
    void deleteAirliner(Integer id);
    @Insert("insert into airlinerinformation(KJName,BuyDate,UseDate,Remark) " +
            "VALUES (#{KJName},#{BuyDate},#{UseDate},#{Remark})")
    void addAirliner(AirlinerInformation airlinerInformation);

    @Select("select * from airlinerinformation where id = #{id}")
    AirlinerInformation getAirlinerById(Integer id);

    void updateAirliner(AirlinerInformation airlinerInformation);
}
